<%=
link_to_remote(image_tag('refresh.gif', {:id=>'dl_refresh', :width=>15, :height=>15, :title=>'refresh deadlines'}),
 {:url=>{:controller=>'task',:action=>'refresh_deadlines'},
  :update=>'deadlines_content',
  :loading=>"$('dl_refresh').src='/images/loading.gif';",
  :success=>"$('dl_refresh').src='/images/s.gif';"})
%>
<div class="section">Past</div>
<ul>
<%= render(:partial=>'task/task', :collection=>@deadlines.select {|t| t.duedate < Date.today}, :locals=>{:item_name=>'dl'}) %>
</ul>
<div class="section">Today</div>
<ul>
<%= render(:partial=>'task/task', :collection=>@deadlines.select {|t| t.duedate == Date.today}, :locals=>{:item_name=>'dl'}) %>
</ul>
<div class="section">Soon</div>
<ul>
<%= render(:partial=>'task/task', :collection=>@deadlines.select {|t| t.duedate > Date.today}, :locals=>{:item_name=>'dl'}) %>
</ul>

